package pl.tssoft.math.core.calculation.operator;

import pl.tssoft.math.core.Value;
import pl.tssoft.math.core.Workspace;
import pl.tssoft.math.core.calculation.Calculable;
import pl.tssoft.math.core.exceptions.CalculationException;

/**
 *
 * @author tserafin
 */
public abstract class Operator implements Calculable {

    private final OperatorType type;
    private final String operatorString;

    public Operator(OperatorType type, String operatorString) {
        this.type = type;
        this.operatorString = operatorString;
    }

    public Value calulate(Workspace w) throws CalculationException {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public String getOperatorString() {
        return operatorString;
    }

    public OperatorType getType() {
        return type;
    }
}
